package cn.easyutil.util.platform.jiguang.bean;

import java.io.Serializable;
import java.text.SimpleDateFormat;

import cn.easyutil.util.javaUtil.StringUtil;

public class JiguangIMUser implements Serializable{
	private static final long serialVersionUID = 1L;
	
	private String username;
	private String password;
	/** 昵称*/
	private String nickname;
	/** 头像*/
	private String headerImg;
	/** 生日 yyyy-MM-dd*/
	private String birthday;
	/** 个性签名*/
	private String signature;
	/** 性别  0-女  1-男*/
	private Integer sex;
	/** 地址*/
	private String address;
	public String getNickname() {
		return nickname;
	}
	public void setNickname(String nickname) {
		this.nickname = nickname;
	}
	public String getHeaderImg() {
		return headerImg;
	}
	public void setHeaderImg(String headerImg) {
		this.headerImg = headerImg;
	}
	public String getBirthday() {
		if(StringUtil.isEmpty(birthday)){
			return null;
		}
		try {
			SimpleDateFormat s =  new SimpleDateFormat("yyyy-MM-dd");
			s.parse(birthday);
			return birthday;
		} catch (Exception e) {
			return null;
		}
	}
	public void setBirthday(String birthday) {
		if(StringUtil.isEmpty(birthday)){
			return;
		}
		try {
			SimpleDateFormat s =  new SimpleDateFormat("yyyy-MM-dd");
			s.parse(birthday);
			this.birthday = birthday;
		} catch (Exception e) {
			return;
		}
	}
	public String getSignature() {
		return signature;
	}
	public void setSignature(String signature) {
		this.signature = signature;
	}
	public Integer getSex() {
		return sex;
	}
	public void setSex(Integer sex) {
		this.sex = sex;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	
}
